package dynamicJsonVerifyer.verifyers.baseDataType;

import com.alibaba.fastjson.JSONObject;
import dynamicJsonVerifyer.Const;
import dynamicJsonVerifyer.verifyers.FieldTypeVerifyer;

public class BooleanVerifyer extends FieldTypeVerifyer {
    @Override
    protected String getType() {
        return Const.BaseVerifyDataType.boolean0;
    }

    @Override
    protected boolean verifyType(JSONObject verifyMetadata, Object appointVaildData) {
        return "0".equals(appointVaildData) || "1".equals(appointVaildData);
    }
}
